home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GF19DOC / GEMFINST.DOC < prev    next >
Text File  |  1993-05-15  |  23KB  |  991 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                                     GemFast v1.9
  29.  
  30.                         Public Domain GEM Programming Library
  31.                                     By Ian Lepore
  32.          
  33.         
  34.                      Installation, Usage, and Portability Notes
  35.         
  36.         
  37.         
  38.         
  39.         
  40.         
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.        Contents
  72.  
  73.        Distribution Archives . . . . . . . . . . . . . . . . . . . . . .    1
  74.  
  75.        HSC Installation and Usage Instructions . . . . . . . . . . . . .    2
  76.           Archive contents . . . . . . . . . . . . . . . . . . . . . . .    2
  77.           Installation . . . . . . . . . . . . . . . . . . . . . . . . .    2
  78.           Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    2
  79.  
  80.        GNU C Installation and Usage Instructions . . . . . . . . . . . .    4
  81.           Archive contents . . . . . . . . . . . . . . . . . . . . . . .    4
  82.           Installation . . . . . . . . . . . . . . . . . . . . . . . . .    4
  83.           Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    4
  84.  
  85.        Lattice C Installation and Usage Instructions . . . . . . . . . .    6
  86.           Archive contents . . . . . . . . . . . . . . . . . . . . . . .    6
  87.           Installation . . . . . . . . . . . . . . . . . . . . . . . . .    6
  88.           Usage  . . . . . . . . . . . . . . . . . . . . . . . . . . . .    7
  89.  
  90.        Turbo C and Pure C Installation and Usage Instructions  . . . . .    8
  91.  
  92.        MWC No Longer Supported . . . . . . . . . . . . . . . . . . . . .    9
  93.  
  94.        GemFast System Overview . . . . . . . . . . . . . . . . . . . . .   10
  95.           Differences from prior GemFast versions  . . . . . . . . . . .   10
  96.           The GEMFAST.H header file  . . . . . . . . . . . . . . . . . .   10
  97.           The GEMFBIND.H header file . . . . . . . . . . . . . . . . . .   11
  98.           The GEMFAST library  . . . . . . . . . . . . . . . . . . . . .   11
  99.           Stack and memory usage . . . . . . . . . . . . . . . . . . . .   12
  100.           GEM and supervisor mode  . . . . . . . . . . . . . . . . . . .   12
  101.           Using G_USERDEF drawing functions  . . . . . . . . . . . . . .   12
  102.  
  103.        Portability Notes . . . . . . . . . . . . . . . . . . . . . . . .   13
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                           i
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.        Distribution Archives
  138.  
  139.  
  140.             GemFast now supports many compilers, and is distributed in
  141.             compiler-specific archives.  The following files should be
  142.             available at your favorite public domain software outlet.  In the
  143.             names, 'vv' refers to the version number.  
  144.  
  145.                  GFvvSRC.LZH  -  Complete source code.
  146.                  GFvvXMP.LZH  -  Example application source code.
  147.                  GFvvDOC.LZH  -  Documentation (reference manual).
  148.  
  149.                  GFvvHSC.LZH  -  Heat and Serve C v2.x libraries.
  150.                  GFvvLC5.LZH  -  Lattice C v5.x libraries.
  151.                  GFvvGCC.LZH  -  GNU C v2.x libraries.
  152.                  GFvvTPC.LZH  -  Turbo C / Pure C libraries.
  153.  
  154.             The source code archive contains complete source code for both
  155.             low-level bindings and high-level library functions, plus
  156.             associated header files, makefiles, etc.
  157.  
  158.             The example archive contains several example applications written
  159.             using GemFast features.
  160.  
  161.             The documentation archive contains the function reference manual
  162.             and this installation document.  Sorry to put the docs in a
  163.             separate archive, but they're awfully big these days, and some
  164.             folks will be needing to download several of the compiler-
  165.             specific archives, and it would be nasty to have to download
  166.             duplicates of all those documents each time.
  167.  
  168.             The compiler-specific archives contain the libraries and header
  169.             files needed to use GemFast with that compiler.  Detailed
  170.             contents of these archives appear in the installation sections
  171.             for each compiler, below.
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                           1
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.        HSC Installation and Usage Instructions
  204.  
  205.  
  206.             Versions of GemFast beginning with v1.9 are designed for use with
  207.             HSC v2.0 or higher.  GemFast is no longer compatible with HSC
  208.             v1.x, or Sozobon C (unmodified), because it now uses the long-
  209.             external-names feature of HSC v2.0.  The object modules in the
  210.             library are in standard GST format, and should work with any
  211.             tools which support the HSC stack-parameters calling standard and
  212.             GST-format object modules.
  213.  
  214.             GemFast for HSC provides both a set of low-level bindings to the
  215.             OS GEM routines, and a library of high-level functions to
  216.             simplify GEM programming.
  217.  
  218.  
  219.        Archive contents
  220.  
  221.  
  222.             The GFvvHSC archive contains these files:
  223.  
  224.                  GEMFAST.A    -  The library.
  225.                  GEMFAST.H    -  The main header file.
  226.                  GEMFBIND.H   -  The low-level bindings header file.
  227.                  EXTERROR.H   -  Header file for extended error messages.
  228.  
  229.  
  230.        Installation
  231.  
  232.  
  233.             Installation of GemFast is fairly simple.  Copy the GEMFAST.A
  234.             file to the directory your compiler uses for libraries.  If you
  235.             use ALN or another indexed linker, be sure to run DOINDEX to
  236.             build new library index files.  Copy the GEMFAST.H, GEMFBIND.H,
  237.             and EXTERROR.H files to the directory your compiler uses for
  238.             header files.  Put the documentation wherever you want.  
  239.  
  240.             When acquired with the HSC distribution, the HSC installation
  241.             program has already installed GemFast for you, but please read
  242.             the following sections.
  243.  
  244.  
  245.        Usage
  246.  
  247.  
  248.             To link your programs with the GemFast libraries, just include
  249.             the library name on the linker command line.  Example:
  250.  
  251.                  cc myprog.c gemfast.a dlibs.a
  252.  
  253.             You can use any runtime startup module you want, when your
  254.             compiler/linker provide several startup modules.  Nothing in the
  255.             GemFast libraries relies on items in the startup files.
  256.  
  257.             Some of the GemFast high-level functions contain references to
  258.             standard runtime library functions, such as sprintf().  The
  259.  
  260.                                           2
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.             GEMFAST.A library name should appear before your runtime library
  270.             name on the linker command line.
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                           3
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.        GNU C Installation and Usage Instructions
  336.  
  337.  
  338.             GemFast v1.9 can only be used with GNU C when using the -mshort
  339.             (16-bit integers) option.  The next release will support 32-bit
  340.             integers as well.  If you forget the -mshort option, the
  341.             GEMFAST.H header file will abort the compile with a #error
  342.             directive reminding you that this version works only with the
  343.             -mshort option.
  344.  
  345.             GemFast for GNU C provides both a set of low-level bindings to
  346.             the OS GEM routines, and a library of high-level functions to
  347.             simplify GEM programming.
  348.  
  349.             When used with GNU C, all low-level and high-level functions are
  350.             declared with ANSI-style prototypes in the header files.
  351.  
  352.  
  353.        Archive contents
  354.  
  355.  
  356.             The GFvvGCC archive contains these files:
  357.  
  358.                  GEMFST16.OLB -  The 16-bit library.
  359.                  GEMFAST.H    -  The main header file.
  360.                  GEMFBIND.H   -  The low-level bindings header file.
  361.                  EXTERROR.H   -  Header file for extended error messages.
  362.  
  363.  
  364.        Installation
  365.  
  366.  
  367.             Installation of GemFast is fairly simple.  Copy the GEMFST16.OLB
  368.             file to the directory your compiler uses for libraries (any
  369.             directory in your GNULIB= list).  Copy the GEMFAST.H, GEMFBIND.H,
  370.             and EXTERROR.H files to the directory your compiler uses for
  371.             header files (any directory in your INCLUDE= list).  Put the
  372.             documentation wherever you want.  
  373.  
  374.             If you have the old GEM support system for GNU C, you can delete
  375.             the libraries and header files that came with it, since GemFast
  376.             completely replaces it.
  377.  
  378.  
  379.        Usage
  380.  
  381.  
  382.             To link your programs with the GemFast libraries, just include
  383.             the library name on the linker command line.  Example:
  384.  
  385.                  cc myprog.c gemfst16.olb -lgnu16
  386.  
  387.             You can use any runtime startup module you want, when your
  388.             compiler/linker provide several startup modules.  Nothing in the
  389.             GemFast libraries relies on items in the startup files.
  390.  
  391.  
  392.                                           4
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.             Some of the GemFast high-level functions contain references to
  402.             standard runtime library functions, such as sprintf().  The
  403.             GEMFST16.OLB library name should appear before your runtime
  404.             library name on the linker command line.
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                           5
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.        Lattice C Installation and Usage Instructions
  468.  
  469.  
  470.             GemFast for Lattice C has been compiled using Lattice C v5.52. 
  471.             Whether it will work with pre-5.5 versions of LC is anyone's
  472.             guess at this point.
  473.  
  474.             GemFast for LC supports both 16- and 32-bit integers, and both
  475.             near and far (base-relative and absolute addressing) data models. 
  476.             The libraries are compiled using near code model, so you'll have
  477.             to have ALV linking enabled to use the library.
  478.  
  479.             GemFast v1.9 for LC doesn't support the register parameter
  480.             passing options of LC right now.  This will be rectified in the
  481.             next release.  
  482.  
  483.             GemFast for LC provides only the high-level functions documented
  484.             in GEMFAST.DOC.  The standard LC bindings libraries and header
  485.             files are used for low-level GEM support.  This means that,
  486.             unlike other compilers, you specify the GemFast library in
  487.             addition to the compiler's GEM library, not instead of it.
  488.  
  489.             When used with LC, all low-level and high-level functions are
  490.             declared with ANSI-style prototypes in the header files.
  491.  
  492.  
  493.        Archive contents
  494.  
  495.  
  496.             The GFvvLC5 archive contains these files:
  497.  
  498.                  GEMF.LIB     -  Long integer base-relative model lib.
  499.                  GEMFNB.LIB   -  Long integer non-base-relative model lib.
  500.                  GEMFS.LIB    -  Short integer base-relative model lib.
  501.                  GEMFSNB.LIB  -  Short integer non-base-relative model lib.
  502.                  GEMFAST.H    -  The main header file.
  503.                  EXTERROR.H   -  Header file for extended error messages.
  504.  
  505.             Note that the suffixes on the GEMFxxxx.LIB files correspond
  506.             exactly to those used by the LC runtime libraries.  If you are
  507.             using LCSNB.LIB as the runtime library for a project, then you
  508.             would use GEMFSNB.LIB as the GemFast library.
  509.  
  510.  
  511.        Installation
  512.  
  513.  
  514.             Installation of GemFast is fairly simple.  Copy the .LIB files to
  515.             the directory your compiler uses for libraries (any directory in
  516.             your LIB= list).  Copy the GEMFAST.H and EXTERROR.H files to the
  517.             directory your compiler uses for header files (any directory in
  518.             your INCLUDE= list).  Put the documentation wherever you want.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                           6
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.        Usage
  535.  
  536.  
  537.             To link your programs with the GemFast libraries, just include
  538.             the library name on the linker command line.  Example:
  539.  
  540.                  lcc -w myprog.c gemfs.lib lcgs.lib
  541.  
  542.             If you are using the Lattice IDE and its project manager, just do
  543.             a Project|Edit|Add and add the apporiate .LIB file name along
  544.             with all your source code module names in the project window.  Be
  545.             sure to include the path name for the library in the IDE's
  546.             Options|Environment|LIB dialog, if you put the GemFast libraries
  547.             in a different path from the compiler's libraries.
  548.  
  549.             You can use any runtime startup module you want, when your
  550.             compiler/linker provide several startup modules.  Nothing in the
  551.             GemFast libraries relies on items in the startup files.
  552.  
  553.             Some of the GemFast high-level functions contain references to
  554.             standard runtime library functions, such as sprintf().  The
  555.             GEMFxxxx.LIB library name should appear before your runtime
  556.             library name on the linker command line.
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                           7
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.        Turbo C and Pure C Installation and Usage Instructions
  600.  
  601.  
  602.             (guess I'll know this after I con someone into compiling up the
  603.             Turbo and Pure C versions of the library for me.)
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.                                           8
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.        MWC No Longer Supported
  666.  
  667.  
  668.             GemFast no longer supports MWC.  It has, quite simply, outgrown
  669.             the capabilities of the MWC compiler.  In fact, since HSC v2.0
  670.             now supports long external names, I would recommend that anyone
  671.             still using MWC consider switching to HSC (or perhaps GNU C)
  672.             instead.  Or best of all, get Lattice C, if you can afford it.
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                           9
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.        GemFast System Overview
  732.  
  733.  
  734.             GemFast provides complete support for GEM programming.  It
  735.             provides the basic GEM support for the HSC and GNU C freeware
  736.             compilers.  For other compilers, the high level functions use the
  737.             existing compiler bindings.  The low-level bindings and utilties
  738.             are written in hand-coded assembler to provide maximum speed and
  739.             memory efficiency.  The higher level functions are written in C
  740.             to provide portability to other compilers.
  741.  
  742.  
  743.        Differences from prior GemFast versions
  744.  
  745.  
  746.             Starting with GemFast v1.9, the GemFast library is contained in a
  747.             single file, GEMFAST.A, which replaces the two files VDIFAST.A
  748.             and AESFAST.A used in prior versions.  There is also now an
  749.             additional header file, GEMFBIND.H.  
  750.  
  751.             You will need to change any existing makefiles which contain the
  752.             two old library names, subsituting the new name GEMFAST.A.  (If
  753.             you're using PAMAKE, set USESGEM=1 in your makefile and let the
  754.             MAKE.INI file set up gemfast in the linker command for you.)
  755.  
  756.             When using HSC and upgrading from v1.8 or earlier to post-v1.8
  757.             GemFast, you will need to recompile all your existing object
  758.             modules and libraries.  This is due to the new HSC 2.0 support
  759.             for long external names; an existing module will have, for
  760.             example, a reference to function graf_sli, and the function in
  761.             the library is now known to the linker by its full name,
  762.             graf_slidebox.
  763.  
  764.  
  765.        The GEMFAST.H header file
  766.  
  767.  
  768.             The GEMFAST.H header file defines constants and datatypes needed
  769.             to use the high-level portion of the GemFast library.  In
  770.             addition, it contains prototypes for all functions in the high-
  771.             level library.  It also contains some conditional sections which
  772.             help make GemFast compatible with all existing ST C compilers.
  773.  
  774.             Part of the conditional logic in GEMFAST.H causes the proper set
  775.             of header files for the compiler's GEM bindings to be included. 
  776.             For some compilers, this will be GEMFBIND.H, described below. 
  777.             For other compilers, it will be the file(s) delivered by the
  778.             compiler vendor for AES and VDI bindings.  For maximal
  779.             portability of your source code, you should #include <gemfast.h>
  780.             in your application modules, and let GEMFAST.H include the proper
  781.             low-level headers for the compiler in use.
  782.  
  783.             The GEMFAST.H header file also contains macros which remap old
  784.             utility function names to the newer (supported) names, and macros
  785.             which route standard GEM calls such as graf_mouse() through new
  786.             support routines such as grf_mouse().  The remapping is done at a
  787.  
  788.                                          10
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.             macro level to provide compatibility with compilers not using the
  798.             low-level GemFast bindings.  This means that you MUST include
  799.             GEMFAST.H into every source code module that contains GEM
  800.             function calls.
  801.  
  802.             If you are using GemFast for the low-level bindings but you are
  803.             not using any of the functions or variables from the high-level
  804.             part of the library, you can #define NO_GEMFAST_HLL before your
  805.             #include <gemfast.h>.  This will eliminate the remapping macros
  806.             that redirect appl_init(), appl_exit(), and other functions
  807.             through the high-level support routines.  This gives you, in
  808.             effect, a set of fast low-level bindings that are 100% compatible
  809.             with the DRI standard, but avoids the extra overhead of the high-
  810.             level library's advanced features.  If you use NO_GEMFAST_HLL,
  811.             you must be very careful not to use any of the functions or
  812.             variables declared in GEMFAST.H, because they won't work
  813.             correctly without the special init and cleanup that normally gets
  814.             done when the appl_init/exit macros route your calls through the
  815.             high-level library.
  816.  
  817.  
  818.        The GEMFBIND.H header file
  819.  
  820.  
  821.             For the HSC and GNU C compilers, GemFast provides the low-level
  822.             GEM bindings support for the compiler.  The GEMFBIND.H header
  823.             file contains function prototypes, macros, and datatypes commonly
  824.             used in GEM programming.  All low-level GEM bindings conform to
  825.             the DRI/Atari documentation of those functions.  (EG,
  826.             evnt_timer() takes a pair of unsigned short words, not a long
  827.             word like some alternate bindings have defined.)
  828.  
  829.             This header file is roughly analogous to the OBDEFS.H and
  830.             GEMDEFS.H files from the old Alcyon compiler, or the AES.H and
  831.             VDI.H files from Lattice C and other newer compilers.
  832.  
  833.             Both VDI and AES items appear in GEMFBIND.H for simplicity in
  834.             maintaining GemFast.  If you aren't using VDI and you want to
  835.             gain a tiny measure of performance, you can #define NO_VDI before
  836.             including GEMFAST.H, and the VDI-related items will be skipped in
  837.             GEMFBIND.H.  Likewise, #define NO_AES can be used to elimated
  838.             AES-related items.
  839.  
  840.  
  841.        The GEMFAST library
  842.  
  843.  
  844.             The GEMFAST library (which exists under varying names for some
  845.             compilers, to support multiple memory models) contains the entire
  846.             GemFast implementation.  For HSC and GNU C, that includes both
  847.             high-level library functions and low-level OS bindings.  For
  848.             other compilers, it contains just the high-level functions, and
  849.             is used along with the compiler's bindings libraries.
  850.  
  851.  
  852.  
  853.  
  854.                                          11
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.        Stack and memory usage
  864.  
  865.  
  866.             The low-level bindings use no data memory other than the global
  867.             variables documented in GEMFAST.DOC.  Most low-level bindings use
  868.             50 bytes or less of stack space.  A noteable exception is
  869.             v_gtext() and similar VDI string input/output functions, which
  870.             use 50 bytes plus two times the length of the string you pass.
  871.  
  872.             The higher level functions in the AES library use more stack
  873.             space, but rarely more than a couple hundred bytes, and never
  874.             more than 1k.  (I've used the new dynamic dialogs with a 2k stack
  875.             without any problem.)
  876.  
  877.             The dynamic dialogs contain embedded resource data, and this has
  878.             bloated the library (and will do the same to your program) a bit. 
  879.             Where possible, I've made similar functions share internal data
  880.             structures such as embedded resource data to try to keep the
  881.             total data size of your programs down to a reasonable size.
  882.  
  883.  
  884.        GEM and supervisor mode
  885.  
  886.  
  887.             You cannot make AES calls from supervisor mode; it has to do with
  888.             the way the AES internals save registers.  With some herculean
  889.             efforts you can hack around it if you need to, but it'll require
  890.             custom assembler code on your part.
  891.  
  892.             You can make VDI calls from supervisor mode.
  893.  
  894.  
  895.        Using G_USERDEF drawing functions
  896.  
  897.  
  898.             If you use G_USERDEF objects, be aware that the custom drawing
  899.             routine you supply will be called in supervisor mode.  This means
  900.             that it cannot make AES calls.  Also, if you make DOS, BIOS, or
  901.             XBIOS calls from the custom drawing routine, you may get a
  902.             spurious stack overflow error message from your C runtime library
  903.             bindings (gemdos(), bios(), and xbios() functions), because being
  904.             on the supervisor stack will confuse any stack checking these
  905.             routines do.
  906.  
  907.             Also, if you are using a compiler with a base-relative memory
  908.             model, be aware that there can be problems with accessing data a
  909.             G_USERDEF drawing routine.  If you declare the function using the
  910.             GCALLBACK type, your compiler will generate code to load the data
  911.             base register on entry to the routine, eliminating this problem. 
  912.             (The GCALLBACK type is defined in GEMFAST.H).
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                                          12
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.        Portability Notes
  930.  
  931.  
  932.             GemFast is now a fairly portable library.  The low-level bindings
  933.             for 16-bit compilers are still written in assembler for maximum
  934.             efficiency.  For use with GNU C in -mshort mode, the HSC JAS
  935.             assembler is used with the -u (unix a.out format output) option
  936.             to compile the low-level bindings.  This avoids the need for a
  937.             second copy of the low-level source in MIT assembler syntax.
  938.  
  939.             The high-level code is written in fairly portable C, in a way
  940.             that seems (so far at least) to work just fine with both Classic
  941.             C and ANSI C compilers. 
  942.  
  943.             The high-level code does assume that the low-level bindings use
  944.             'short' as the basic datatype for the GEM interface.  You will
  945.             have nothing but trouble trying to port this code to a 32-bit
  946.             compiler that uses 'int' as the GEM datatype.
  947.  
  948.             Ian Lepore
  949.             04/23/93
  950.             BIX      ianl@bix.com            (preferred email address)
  951.             Internet ilepore@nyx.cs.du.edu
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.                                          13
  987.  
  988.  
  989.  
  990.  
  991.